<!DOCTYPE html>
<html lang="zh-CN">
    <head>
        <meta charset="UTF-8">
        <title>404 Not Found - FNK</title>
        <link rel="stylesheet" href="/static/css/navbar.css">
        <style>
        /* 404错误内容 */
        .error-content {
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            min-height: calc(100vh - 70px);
            padding: 40px 20px;
            text-align: center;
        }
        
        .error-container {
            max-width: 700px;
            padding: 50px;
            background-color: white;
            border-radius: 10px;
            box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
        }
        
        .error-code {
            font-size: 120px;
            font-weight: bold;
            color: #e74c3c;
            margin-bottom: 20px;
            line-height: 1;
        }
        
        .error-title {
            font-size: 36px;
            margin-bottom: 20px;
            color: #2c3e50;
        }
        
        .error-description {
            font-size: 18px;
            margin-bottom: 40px;
            color: #7f8c8d;
            line-height: 1.7;
        }
        
        .action-buttons {
            display: flex;
            gap: 20px;
            justify-content: center;
            flex-wrap: wrap;
        }
        
        .btn {
            display: inline-block;
            padding: 14px 28px;
            border-radius: 6px;
            text-decoration: none;
            font-weight: 500;
            font-size: 16px;
            transition: all 0.3s ease;
        }
        
        .btn-primary {
            background-color: #3498db;
            color: white;
            border: 2px solid #3498db;
        }
        
        .btn-primary:hover {
            background-color: #2980b9;
            border-color: #2980b9;
            transform: translateY(-2px);
        }
        
        .btn-secondary {
            background-color: white;
            color: #3498db;
            border: 2px solid #3498db;
        }
        
        .btn-secondary:hover {
            background-color: #f8f9fa;
            transform: translateY(-2px);
        }
        
        /* 动画效果 */
        @keyframes float {
            0% { transform: translateY(0px); }
            50% { transform: translateY(-15px); }
            100% { transform: translateY(0px); }
        }
        
        .error-illustration {
            width: 220px;
            margin-bottom: 40px;
            animation: float 3s ease-in-out infinite;
        }
        
        /* 响应式设计 */
        @media (max-width: 768px) {
            .navbar {
                padding: 0 15px;
                height: 60px;
            }
            
            .logo {
                font-size: 1.5em;
            }
            
            .nav-links li {
                margin-left: 15px;
            }
            
            .error-code {
                font-size: 80px;
            }
            
            .error-title {
                font-size: 28px;
            }
            
            .error-description {
                font-size: 16px;
            }
            
            .btn {
                padding: 12px 24px;
            }
            
            .error-container {
                padding: 30px 20px;
            }
        }
        
        @media (max-width: 480px) {
            .nav-links {
                display: none; /* 小屏幕上可以替换为汉堡菜单 */
            }
            
            .error-code {
                font-size: 60px;
            }
            
            .action-buttons {
                flex-direction: column;
                gap: 12px;
            }
            
            .btn {
                width: 100%;
            }
        }
      </style>
    </head>
    <body>
        <nav class="navbar">
            <div class="logo">FNK</div>
            <ul class="nav-links">
                <li><a href="/home">首页</a></li>
                <li><a href="/file">文件</a></li>
                <li><a href="/note">笔记</a></li>
                <li><a href="/resource">资源</a></li>
                <li><a href="/about">关于</a></li>
            </ul>
            <div class="users">
                {% if user %}
                    <p>{{ user }}</p>
                    <button class="user-btn" onclick="javascript:location.href='/logout'">登出</button>
                {% else %}
                    <button class="user-btn" onclick="javascript:location.href='/login'">登录</button>
                {% endif %}
            </div>
        </nav>
        <!-- 404错误内容 -->
    <main class="error-content">
      <div class="error-container">
          <!-- 错误插图 -->
          <svg class="error-illustration" viewBox="0 0 200 200" xmlns="http://www.w3.org/2000/svg">
              <circle cx="100" cy="100" r="90" fill="#fadbd8"/>
              <path d="M60,60 L140,140 M60,140 L140,60" stroke="#e74c3c" stroke-width="10" stroke-linecap="round"/>
              <circle cx="100" cy="100" r="80" fill="none" stroke="#e74c3c" stroke-width="5" stroke-dasharray="5,5"/>
              <text x="100" y="190" text-anchor="middle" font-size="20" fill="#e74c3c">404</text>
          </svg>
          
          <div class="error-code">404</div>
          <h1 class="error-title">哎呀！页面找不到了</h1>
          <p class="error-description">
              您访问的页面可能已被移除、更名或暂时不可用。<br>
              请检查您输入的网址是否正确，或者使用下方的按钮返回。
          </p>
          
          <div class="action-buttons">
              <a href="/home" class="btn btn-primary">返回首页</a>
              <a href="javascript:history.back()" class="btn btn-secondary">返回上一页</a>
          </div>
      </div>
  </main>
    </body>
</html>
